<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page session="false" contentType="text/html; charset=UTF-8"%>
<html>
<head>
	<title>Home</title>

</head>
<body>
<h1>
	Hello world!
	It just Test.  
</h1>

<P>  The time on the server is ${serverTime}. </P>

<h3>파일(들)을 선택하세요.</h3>
<!-- multiple 속성을 이용하면 파일을 다중으로 업로드 할 수 있음 -->
<input id="files-upload" type="file" multiple>

<h3>선택된 파일들</h3> 
<ul id="file-list"> 
  <li class="no-items">(파일이 선택되 않음)</li> 
</ul>


</form>
</body>
	<script type="text/javascript">
	var filesUpload = document.getElementById("files-upload"),
    fileList = document.getElementById("file-list");

function traverseFiles (files) {
  var li,
      file,
      fileInfo;
  fileList.innerHTML = "";
    
  for (var i=0, il=files.length; i<il; i++) {
    li = document.createElement("li");
    file = files[i];
    fileInfo = "<div><strong>Name:</strong> " + file.name + "</div>";
    fileInfo += "<div><strong>Size:</strong> " + file.size + " bytes</div>";
    fileInfo += "<div><strong>Type:</strong> " + file.type + "</div>";
    li.innerHTML = fileInfo;
    fileList.appendChild(li);
  };
};

filesUpload.onchange = function () {
  traverseFiles(this.files);
};
	</script>
</html>
